<?php



namespace App\Zesow;

use EasyWeChat\Factory;
use App\Services\Base\Services\ConfigService;
use App\Services\Base\Interfaces\ConfigServiceInterface;
use  Overtrue\Socialite\SocialiteManager;

class WechatWeb
{
    private static $instance = null;

    private function __construct()
    {
    }


    public static function getInstance()
    {
        if (!self::$instance) {
            /**
             * @var ConfigService $configService
             */
            $configService = app()->make(ConfigServiceInterface::class);
            $config = $configService->getWechatWebConfig();
            self::$instance = new  SocialiteManager($config);
        }

        return self::$instance;
    }
}
